home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / security / crack_4.1-tar / Docs / readme.txt < prev   
Encoding:
Text File  |  1992-06-25  |  30.3 KB  |  853 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.                     "Crack Version 4.1"
  11.             A Sensible Password Checker for Unix
  12.  
  13.  
  14.                      Alec D.E. Muffett
  15.  
  16.                    Unix Software Engineer
  17.                    Aberystwyth, Wales, UK
  18.       (aem@aber.ac.uk or alec_muffett@hicom.lut.ac.uk)
  19.  
  20.  
  21.                           ABSTRACT
  22.  
  23.           Crack is a freely available program  designed
  24.      to   find   standard   Unix   eight-character  DES
  25.      encrypted passwords  by  standard  guessing  tech-
  26.      niques outlined below.  It is written to be flexi-
  27.      ble, configurable and fast, and to be able to make
  28.      use  of  several  networked hosts via the Berkeley
  29.      rsh program (or similar), where possible.
  30.  
  31.  
  32.  
  33. 1.  Statement of Intent
  34.  
  35. This package is meant as a proving device to  aid  the  con-
  36. struction  of  secure  computer systems.  Users of Crack are
  37. advised that they may get severly hassled  by  authoritarian
  38. type sysadmin dudes if they run Crack without proper author-
  39. isation.
  40.  
  41. 2.  Introduction to Version 4.0
  42.  
  43. Crack is now into it's fourth version, and has been reworked
  44. extensively  to provide extra functionality, and the purpose
  45. of this release is to consolidate as much of this new  func-
  46. tionality into as small a package as possible.  To this end,
  47. Crack may appear to be less configurable: it has been  writ-
  48. ten on the assumption that you run a fairly modern Unix, one
  49. with BSD functionality, and then patched in order to run  on
  50. other systems.
  51.  
  52. This, surprisingly enough, has led to neater code,  and  has
  53. made  possible the introduction of greater flexibility which
  54. supercedes many of the options that could be  configured  in
  55. earlier  versions  of  Crack.  In the same vein, some of the
  56. older options are now mandatory.  These,  such  as  feedback
  57. mode  and  CRACK_PRINTOUT are no longer supported as options
  58. and probably never will be again.  There is just  a  lot  of
  59. wastage  in not running with them, and too many dependencies
  60. in other functions to bother programming around them.
  61.  
  62.  
  63.  
  64.                        March 3, 1992
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                            - 2 -
  71.  
  72.  
  73. The user interface is basically identical  to  the  previous
  74. versions,  although  some  people have asked about providing
  75. X-windows GUI's to Crack, I think it would  be  a  waste  of
  76. time to do so. Crack has far less options than your ordinary
  77. version of /bin/ls.
  78.  
  79. 3.  Introduction to Version 4.1
  80.  
  81. Version 4.1 of the Crack program is an attempt to extend the
  82. features  introduced  in v4.0 and provide hooks for external
  83. libraries such  as  Michael  Glad's  wonderful  UFC  crypt()
  84. implementation,  which (on some platforms) can outperform my
  85. fcrypt() by a factor of 3.  I have also been  burdened  with
  86. the  task of making Crack's memory handling bombproof (hah!)
  87. in the vague hope that it will survive running out of memory
  88. on small machines.[1]
  89.  
  90. The extensions that I mention above regard the  addition  of
  91. extra primitives to the dictionary processing language which
  92. permit the production of more concise dictionaries  contain-
  93. ing  words,  more  of which are likely to be passwords.  The
  94. idea is to gain efficiency by removing  some  of  the  dross
  95. from the generated dictionaries.
  96.  
  97. Crack should (generally) be more  disk-space  efficient  now
  98. that  the  program  can  spot  dictionaries  which have been
  99. compressed using compress or pack and will  uncompress  them
  100. on  the  fly  as  necessary  (using  zcat  or  pcat  respec-
  101. tively).[2]
  102.  
  103. 4.  Crack Methodology - Part 1: Internals
  104.  
  105. Crack takes as its input a  series  of  password  files  and
  106. source  dictionaries.  It merges the dictionaries, turns the
  107. password files into a sorted list, and  generates  lists  of
  108. possible passwords from the merged dictionary or from infor-
  109. mation gleaned about users from the password file.  It  does
  110. _________________________
  111.   [1] - or even on large ones. Brian Tompsett  at  Hull
  112. tweaked  Crack  v3.3  until  it could run to completion
  113. after filling the swapspace on each  of  a  network  of
  114. SparcStation2's.  Due  to restructuring work on v4.0, I
  115. have had to  write  my  own  sorting  algorithm  &  re-
  116. implement  all of his tweaks from scratch, and can only
  117. hope that I have emulated  the  bombproofness  of  this
  118. desirable (?) functionality.
  119.   [2] Note to people who are short on memory  or  swap:
  120. do  remember  that to do this Crack will have to fork()
  121. (via popen()) and might not be able to create  the  un-
  122. compressing  process.  Hence, if you intend to swaplock
  123. your machine, don't compress the  dictionaries.  Switch
  124. this off by editing the Crack shellscript.
  125.  
  126.  
  127.  
  128.  
  129.                        March 3, 1992
  130.  
  131.  
  132.  
  133.  
  134.  
  135.                            - 3 -
  136.  
  137.  
  138. not attempt to remedy the problem of allowing users to  have
  139. guessable  passwords,  and it should NOT be used in place of
  140. getting a really good, secure passwd program replacement.[3]
  141.  
  142. The above paragraphs define the purpose of Crack, and embody
  143. a  great  deal of hard work, screams of Eureka!, drunkeness,
  144. and a fair amount of swearing too.  There is a lot of think-
  145. ing, philosophy, and empirical guesswork behind the way that
  146. Crack attacks password files, and although it  is  not  per-
  147. fect,  I  certainly hope that Crack will out-do most of it's
  148. competitors.
  149.  
  150. Crack works by making many individual passes over the  pass-
  151. word  entries  that  you  supply to it.  Each pass generates
  152. password guesses based upon a sequence of rules, supplied to
  153. the  program  by  the  user.  The  rules  are specified in a
  154. simplistic   language   in   the   files   gecos.rules   and
  155. dicts.rules, to be found in the Scripts directory.  The dis-
  156. tinction between these two files will be made clear later.
  157.  
  158. The rules are written as a simple string of characters, with
  159. one  rule  to a line.  Blank lines, and comment lines begin-
  160. ning with a hash character #  are  ignored.   Trailing  whi-
  161. tespace  is  also ignored.  The instructions in the rule are
  162. followed from left to right, and are applied to the diction-
  163. ary  words one by one, as the words are loaded.  Some simple
  164. pattern matching primitives are provided for selection  pur-
  165. poses,  so  that  if  the dictionary word does not match the
  166. pattern, it is ignored.  This  saves  on  time  and  memory.
  167. Before  carrying  on,  I  suggest  that  you  browse through
  168. Scripts/dicts.rules, take a look at the  rules  supplied  as
  169. defaults, and try to work out what they do.
  170.  
  171. The rules are stored in two different  files  for  two  dif-
  172. ferent  purposes.   Rules in Scripts/gecos.rules are applied
  173. to data generated by Crack from the  pw_gecos  and  pw_gecos
  174. entries  of  the user's password entry.  The data fed to the
  175. gecos rules for the user aem, who  is  Alec  David  Muffett,
  176. Systems  would be: aem, Alec, David, Muffett, Systems, and a
  177. series of permutations of those  words,  either  re-ordering
  178. the  words  and  joining them together (eg: AlecMuffett), or
  179. making up new words based on initial  letters  of  one  word
  180. taken with the rest of another (eg: AMuffett).[4]
  181.  
  182. The entire set of rules in gecos.rules is applied to each of
  183. _________________________
  184.   [3] See the end of ths document for more  information
  185. about passwd replacements.
  186.   [4] - and ASystems and DSystems, and MSystems, etc...
  187. because  Crack  does  not  differentiate.  Hence,  care
  188. should be taken to check for redundancy when adding new
  189. rules, so as not to waste time during the gecos pass.
  190.  
  191.  
  192.  
  193.  
  194.                        March 3, 1992
  195.  
  196.  
  197.  
  198.  
  199.  
  200.                            - 4 -
  201.  
  202.  
  203. these words, which creates many more permutations and combi-
  204. nations,  all  of which are tested.  Hence testing the pass-
  205. word gecos information under Crack v4.0  and  upwards  takes
  206. somewhat   longer  than  previously,  but  it  is  far  more
  207. thorough.
  208.  
  209.  
  210. After a pass has been made over  the  data  based  on  gecos
  211. information,  Crack  makes  further passes over the password
  212. data using successive rules from the Scripts/dicts.rules  by
  213. loading  the  whole  of Dicts/bigdict file into memory, with
  214. the rule being applied to each word from  that  file.   This
  215. generates a resident dictionary, which is sorted and uniqued
  216. so as to prevent wasting time on repetition. After each pass
  217. is  completed, the memory used by the resident dictionary is
  218. freed up, and (hopefully) re-used when the  next  dictionary
  219. is loaded.
  220.  
  221. The Dicts/bigdict dictionary is created by Crack by merging,
  222. sorting,  and uniq'ing the source dictionaries, which are to
  223. be found in the directory DictSrc  and  which  may  also  be
  224. named  in  the Crack shellscript, via the $STDDICT variable.
  225. (The default value of $STDDICT is /usr/dict/words).
  226.  
  227. The file DictSrc/bad_pws.dat is a dictionary which is  meant
  228. to  provide  many  of  those common but non-dictionary pass-
  229. words, such as 12345678 or qwerty.
  230.  
  231. If you wish to provide a dictionary of your own,  just  copy
  232. it  into  the  DictSrc  directory (use compress on it if you
  233. wish to save space; Crack will unpack it  whilst  generating
  234. the  big  dictionary)  and  then  delete the contents of the
  235. Dicts directory by running Scripts/spotless.  Your new  dic-
  236. tionary will be merged in on the next run. For more informa-
  237. tion on dictionary attacks, see the excellent  paper  called
  238. "Foiling  the  Cracker:  A  Survey  of, and Improvements to,
  239. Password  Security"  by   Daniel   Klein,   available   from
  240. ftp.sei.cmu.edu  in  ~/pub/dvk/passwd.*.   Also, please read
  241. the APPENDIX file supplied with this distribution.[5]
  242.  
  243. Having described the method of cracking, perhaps  we  should
  244. now  investigate  the algorithm used to overlay the cracking
  245. mechanism.
  246.  
  247.  
  248.  
  249. _________________________
  250.   [5] Extra dictionaries (those detailed in Dan Klein's
  251. paper)   can   be   obtained  via  anonymous  FTP  from
  252. ftp.uu.net (137.39.1.9) as ~/pub/dictionaries.tar.Z; or
  253. check  an Archie database for other possible sources of
  254. dictionaries.
  255.  
  256.  
  257.  
  258.  
  259.                        March 3, 1992
  260.  
  261.  
  262.  
  263.  
  264.  
  265.                            - 5 -
  266.  
  267.  
  268. 5.  Crack Methodology - Part 2: Feedback Filters
  269.  
  270. As is stated above, Crack permutes  and  loads  dictionaries
  271. directly   into  memory,  sorts  and  uniques  them,  before
  272. attempting to use each of the words  as  a  guess  for  each
  273. users'  password.  If Crack correctly guesses a password, it
  274. marks the user as done and does not waste  further  time  on
  275. trying to break that users password.
  276.  
  277. Once Crack has finished a dictionary  pass,  it  sweeps  the
  278. list  of  users looking for the passwords it has cracked. It
  279. stores the cracked passwords in both plaintext and encrypted
  280. forms in a feedback file in the directory Runtime.  Feedback
  281. files have names of the form Runtime/F*.
  282.  
  283. The purpose of this is so that, when Crack is next  invoked,
  284. it  may recognise passwords that it has successfully cracked
  285. before, and filter them  from  the  input  to  the  password
  286. cracker.  This  provides  an instant list of crackable users
  287. who have not changed their passwords  since  the  last  time
  288. Crack was run. This list appears in a file with name out* in
  289. the $CRACK_OUT directory, or on stdout, if  foreground  mode
  290. is invoked (see Options, below).
  291.  
  292. In a similar vein, when a Crack run terminates normally,  it
  293. writes out to the feedback file all encrypted passwords that
  294. it has NOT succeeded in cracking.  Crack  will  then  ignore
  295. all of these passwords next time you run it.
  296.  
  297. Obviously, this is not desirable if  you  frequently  change
  298. your  dictionaries  or  rules, and so there is a script pro-
  299. vided,  Scripts/mrgfbk  which  sorts  your  feedback  files,
  300. merges  them  into one, and optionally removes all traces of
  301. 'uncrackable' passwords, so that your  next  Crack  run  can
  302. have  a  go  at  passwords  it has not succeeded in breaking
  303. before.
  304.  
  305. Mrgfbk is invoked automatically if you run Scripts/spotless.
  306.  
  307. 6.  Crack Methodology - Part 3: Execution and Networking
  308.  
  309. Each time Crack is invoked, whether  networked  or  not,  it
  310. generates  a diefile with a name of the form Runtime/D* (for
  311. network cracks, this file is generated by RCrack, and is  of
  312. the  form  Runtime/DR* which points to a real diefile, named
  313. Runtime/RD* - see below for details).
  314.  
  315. These diefiles contain debugging information about the  job,
  316. and are generated so that all the jobs on the entire network
  317. can be called quickly by invoking Scripts/plaster.  Diefiles
  318. delete themselves after they have been run.
  319.  
  320. As you will read in the sections below, Crack has a -network
  321. option:   This   is  designed  to  be  a  simple  method  of
  322.  
  323.  
  324.  
  325.                        March 3, 1992
  326.  
  327.  
  328.  
  329.  
  330.  
  331.                            - 6 -
  332.  
  333.  
  334. automatically spreading the load of  password  cracking  out
  335. over  several  machines on a network, preferably if they are
  336. connected by some form of networked filestore.
  337.  
  338. When Crack -network is invoked, it filters its input in  the
  339. ordinary  way,  and  then splits its load up amongst several
  340. machines    which    are    specified    in     the     file
  341. Scripts/network.conf.
  342.  
  343. This file contains a series  of  hostnames,  power  ratings,
  344. flags,  etc,  relevant  to  the  running  of  Crack  on each
  345. machine.  Crack then calls Scripts/RCrack  to  use  the  rsh
  346. command  (or  similar)  to  invoke Crack on the other hosts.
  347. See the RCrack script, and the example network.conf file for
  348. details.
  349.  
  350. 7.  Installation
  351.  
  352. Crack is one of those most  unusual  of  beasties,  a  self-
  353. installing  program.  Some people have complained about this
  354. apparent weirdness, but it has  grown  up  with  Crack  ever
  355. since  the  earliest  network  version,  when I could not be
  356. bothered to log into several different machines with several
  357. different   architectures,   just  in  order  to  build  the
  358. binaries. Once the necessary configuration options have been
  359. set,  the  executables  are  created via make by running the
  360. Crack shellscript .
  361.  
  362. Crack's configuration lies in two  files,  the  Crack  shell
  363. script,  which contains all the installation specific confi-
  364. guration data, and the file Sources/conf.h,  which  contains
  365. configuration options specific to various binary platforms.
  366.  
  367. In  the  Crack  shellscript,  you  will  have  to  edit  the
  368. CRACK_HOME  variable  to  the  correct value.  This variable
  369. should be set to an absolute path name  (names  relative  to
  370. ~username  are  OK,  so  long  as you have some sort of csh)
  371. through which the directory containing Crack may be accessed
  372. on  ALL  the  machines that Crack will be run on. There is a
  373. similar  variable  CRACK_OUT  which  specifies  where  Crack
  374. should  put  its output files - by default, this is the same
  375. as $CRACK_HOME.
  376.  
  377. You will also have to edit the file Sources/conf.h and  work
  378. out which switches to enable.  Each #define has a small note
  379. explaining its purpose.  Where I have been  in  doubt  about
  380. the portability of certain library functions, usually I have
  381. re-written it, so you should be OK.  Let  me  know  of  your
  382. problems, if you have any.
  383.  
  384. If you will be using Crack -network you will  then  have  to
  385. generate  a  Scripts/network.conf file. This contains a list
  386. of hostnames to rsh to, what their binary  type  is  (useful
  387. when   running   a   network   Crack  on  several  different
  388.  
  389.  
  390.  
  391.                        March 3, 1992
  392.  
  393.  
  394.  
  395.  
  396.  
  397.                            - 7 -
  398.  
  399.  
  400. architectures), a guesstimate of their relative power  (take
  401. your  slowest machine as unary, and measure all others rela-
  402. tive to it), and a list of per-host flags to  add  to  those
  403. specified on the Crack command line, when calling that host.
  404. There is an example of such a file provided in  the  Scripts
  405. directory - take a look at it.
  406.  
  407. If ever you wish to specify a more precise figure as to  the
  408. relative  power  of  your  machines,  or you are simply at a
  409. loss, play with the command make tests in  the  source  code
  410. directory.    This  can  provide  you  with  the  number  of
  411. fcrypt()s that your machine can do per second,  which  is  a
  412. number that you can plug into your network.conf as a measure
  413. of your machines' power (after  rounding  the  value  to  an
  414. integer).
  415.  
  416. 8.  Usage
  417.  
  418. Okay, so, let's assume  that  you  have  edited  your  Crack
  419. script,  and  your Sources/conf.h file, where do you go from
  420. here ?
  421.  
  422.  
  423. Crack [options] [bindir] /etc/passwd [...other passwd files]
  424.  
  425. Crack -network [options] /etc/passwd [...other passwd files]
  426.  
  427.  
  428. Where bindir is the optional name of the directory where you
  429. want  the binaries installed.  This is useful where you want
  430. to be able to run versions of  Crack  on  several  different
  431. architectures.  If  bindir does not exist, a warning will be
  432. issued, and the directory created.
  433.  
  434.      Note: bindir defaults to the name generic  if  not
  435.      supplied.
  436.  
  437.  
  438. Notes for  Yellow  Pages  (NIS)  Users:  I  have  occasional
  439. queries  about  how  to get Crack running from a YP password
  440. file.  There are several methods, but by far the simplest is
  441. to generate a passwd format file by running:-
  442.  
  443.                   ypcat passwd > passwd.yp
  444.  
  445. and then running Crack on this file.
  446.  
  447. 9.  Options
  448.  
  449. -f   Runs Crack in foreground mode, ie: the password cracker
  450.      is  not backgrounded, and messages appear on stdout and
  451.      stderr as you would expect.  This option is only really
  452.      useful  for very small password files, or when you want
  453.      to put a wrapper script around Crack.
  454.  
  455.  
  456.  
  457.                        March 3, 1992
  458.  
  459.  
  460.  
  461.  
  462.  
  463.                            - 8 -
  464.  
  465.  
  466.      Foreground mode is disabled if you  try  running  Crack
  467.      -network  -f on the command line, because of the insen-
  468.      sibility of rshing to several machines in turn, waiting
  469.      for  each  one  to finish before calling the next. How-
  470.      ever, please read the section  about  Network  Cracking
  471.      without NFS/RFS, below.
  472.  
  473. -v   Sets verbose mode, whereby Crack will print every guess
  474.      it is trying on a per-user basis.  This is a very quick
  475.      way of flooding your filestore, but useful if you think
  476.      something is going wrong.
  477.  
  478. -m   Sends mail to any user  whose  password  you  crack  by
  479.      invoking  Scripts/nastygram  with  their username as an
  480.      argument.  The reason for using the script is so that a
  481.      degree of flexibility in the format of the mail message
  482.      is supplied; ie: you don't have to  recompile  code  in
  483.      order to change the message.[6]
  484.  
  485. -nvalue
  486.      Sets the process to be nice()ed to value, so, for exam-
  487.      ple,  the  switch -n19 sets the Crack process to run at
  488.      the lowest priority.
  489.  
  490. -network
  491.      Throws Crack into network mode, in which it  reads  the
  492.      Scripts/network.conf file, splits its input into chunks
  493.      which are sized according to the power  of  the  target
  494.      machine,  and  calls  rsh to run Crack on that machine.
  495.      Options for Crack running on the target machine may  be
  496.      supplied  on  the  command line (eg: verbose or recover
  497.      mode), or in the network.conf file if they  pertain  to
  498.      specific hosts (eg: nice() values).
  499.  
  500. -r<pointfile>
  501.      This is only for use  when  running  in  recover  mode.
  502.      When  a  running  Crack  starts pass 2, it periodically
  503.      saves its state in a pointfile, with a name of the form
  504.      Runtime/P.*  This file can be used to recover where you
  505.      were should a  host  crash.   Simply  invoke  Crack  in
  506.      exactly  the  same  manner  as  the last time, with the
  507.      addition of the -r switch,  (eg:  -rRuntime/Pfred12345)
  508. _________________________
  509.   [6] I'm uncertain about the wisdom of mailing someone
  510. like this.  If someone browses your cracked user's mail
  511. somehow, it's like a great big neon  sign  pointing  at
  512. the  user  saying "This Is A Crackable Account - Go For
  513. It!".  Not to mention the false sense  of  security  it
  514. engenders  in  the  System Manager that he's "informed"
  515. the user to change his  password.   What  if  the  user
  516. doesn't  log  on  for 3 months? However, so many people
  517. have wired it into their own versions of Crack, I  sup-
  518. pose it must be provided... AEM
  519. <1b>9
  520.  
  521.  
  522.                        March 3, 1992
  523.  
  524.  
  525.  
  526.  
  527.  
  528.                            - 9 -
  529.  
  530.  
  531.      switch.  Crack will startup and read the file, and jump
  532.      to  roughly  where  it left off.  If you are cracking a
  533.      very large password file, this can save oodles of  time
  534.      after a crash.
  535.  
  536.      If you were running a network Crack, then the jobs will
  537.      again  be spawned onto all the machines of the original
  538.      Crack.  The program will then check that the host it is
  539.      running   on  is  the  same  as  is  mentioned  in  the
  540.      pointfile.  If it is not, it will quietly  die.   Thus,
  541.      assuming that you supply the same input data and do not
  542.      change your network.conf file,  Crack  should  pick  up
  543.      where  it  left off.  This is a bit inelegant, but it's
  544.      better than nothing at the moment.
  545.  
  546.      The method of  error  recovery  outlined  above  causes
  547.      headaches  for  users who want to do multiprocessing on
  548.      parallel architectures.  Crack is in no  way  parallel,
  549.      and  because  of the way it's structured (reading stdin
  550.      from shellscript frontends) it is a pain to divide  the
  551.      work amongst several processes via fork()ing.
  552.  
  553.      The hack solution to get several copies of  Crack  run-
  554.      ning  on one machine with n processors at the moment is
  555.      to insert n copies  of  the  entry  for  your  parallel
  556.      machine  into the Scripts/network.conf file. If you use
  557.      the -r option in these circumstances however, you  will
  558.      get n copies of the recovered process running, only one
  559.      of them will have the correct input data.
  560.  
  561.      The old solution to this problem (see old documentation
  562.      if  you  are interested) has been negated by the intro-
  563.      duction of feedback mode, so the best bet in this  par-
  564.      ticular  situation  is to wait until the other jobs are
  565.      done (and have written out lists of  uncrackable  pass-
  566.      words),  and then re-start the jobs from scratch.  Any-
  567.      one whose password was not cracked  on  the  first  run
  568.      will be ignored on the second, if they have not changed
  569.      it since.  This is inelegant, but it's the best  I  can
  570.      do in the limited time available.
  571.  
  572. 10.  Support Scripts
  573.  
  574. The Scripts directory contains a small number of support and
  575. utility  scripts,  some  of which are designed to help Crack
  576. users check their progress.  Briefly, the most  useful  ones
  577. are:-
  578.  
  579. Scripts/shadmrg
  580.      This is a small (but  hopefully  readable)  script  for
  581.      merging  /etc/passwd  and /etc/shadow on System V style
  582.      shadow password systems.  It produces the  merged  data
  583.      to stdout, and will need redirecting into a file before
  584.      Crack can work on it.  The script is meant to be fairly
  585.  
  586.  
  587.  
  588.                        March 3, 1992
  589.  
  590.  
  591.  
  592.  
  593.  
  594.                            - 10 -
  595.  
  596.  
  597.      lucid,  on the grounds that I worry that there are many
  598.      shadowing schemes out there, and perhaps not  all  have
  599.      the same data format.
  600.  
  601.      I have not wired this facility into the  Crack  command
  602.      itself because the world does NOT revolve around System
  603.      V yet, regardless of what some  people  would  have  me
  604.      believe,  and I believe that the lack of direct support
  605.      for NIS outlined above, sets a  precedent.   There  are
  606.      just  too  many  incompatibilities  in  shadow password
  607.      schemes for me to hardwire anything.
  608.  
  609. Scripts/plaster
  610.      which is named after a dumb joke, but is a simple fron-
  611.      tend  to  the Runtime/D* diefiles that each copy of the
  612.      password cracker  generates.  Invoking  Scripts/plaster
  613.      will  kill  off  all copies of the password cracker you
  614.      are running, over the network or otherwise.
  615.  
  616. Scripts/status
  617.      This script rshes to  each  machine  mentioned  in  the
  618.      Scripts/network.conf  file,  and provides some informa-
  619.      tion about processes and uptime on that machine.   This
  620.      is  useful when you want to find out just how well your
  621.      password crackers are getting on during a  Crack  -net-
  622.      work.
  623.  
  624. Scripts/{clean,spotless}
  625.      These are really just frontends to a makefile. Invoking
  626.      Scripts/clean  tidies  up the Crack home directory, and
  627.      removes probably unwanted files, but  leaves  the  pre-
  628.      processed  dictionary bigdict intact.  Scripts/spotless
  629.      does the same as Scripts/clean but obliterates  bigdict
  630.      and  old  output files too, and compresses the feedback
  631.      files into one.
  632.  
  633. Scripts/nastygram
  634.      This is the shellscript that is invoked by the password
  635.      cracker  to send mail to users who have guessable pass-
  636.      words, if the -m option is used. Edit it at  your  lei-
  637.      sure to suit your system.
  638.  
  639. Scripts/guess2fbk
  640.      This script takes your  out*  files  as  arguments  and
  641.      reformats  the  'Guessed'  lines  into a slightly messy
  642.      feedback file, suitable for storing with the others.
  643.  
  644.      An occasion where this might be  useful  is  when  your
  645.      cracker  has  guessed  many peoples passwords, and then
  646.      died for some reason (a crash?) before writing out  the
  647.      guesses to a feedback file.  Running
  648.  
  649.              Scripts/guess2fbk out* >> Runtime/F.new
  650.  
  651.  
  652.  
  653.  
  654.                        March 3, 1992
  655.  
  656.  
  657.  
  658.  
  659.  
  660.                            - 11 -
  661.  
  662.  
  663.      will save the work that has been done.
  664.  
  665. 11.  Network Cracking without NFS/RFS
  666.  
  667. For those users who have some form of rsh  command,  but  do
  668. not  have  a  a  networked  filestore running between hosts,
  669. there is now a solution which will allow you to do networked
  670. cracking, proposed to me by Brian Tompsett at Hull.  Person-
  671. ally, I consider the idea to be potty, but it fills in miss-
  672. ing functionality in a wonderfully tacky manner.
  673.  
  674. From the documentation above, you will note that Crack  will
  675. undo  the -f (output in foreground) option, if it is invoked
  676. with the -network switch at the same time (see  the  Options
  677. section  above).  This is true, but it does not apply if you
  678. specify -f option in the network.conf file.
  679.  
  680. The practical upshot of doing this is that remote copies  of
  681. Crack  can  be  made  to read from stdin and write to stdout
  682. over a network link, and thus remote  processing  is  accom-
  683. plished.   I  have  tweaked  Crack in such a way, therefore,
  684. that if the -f option is specified amongst  the  crack-flags
  685. of  a  host  in  the network.conf, rather than backgrounding
  686. itself on the remote host, the rsh command on the server  is
  687. backgrounded, and output is written directly to the files on
  688. the server's filestore.
  689.  
  690. There are restrictions upon this  method,  mostly  involving
  691. the number of processes that a user may run on the server at
  692. any one time, and that you will  have  to  collect  feedback
  693. output  together  manually  (dropping  it  into  the Runtime
  694. directory on the server).  However, it works. Also,  if  you
  695. try  to use rsh as another user, you will suffer problems if
  696. rsh insists on reading something from your terminal  (eg:  a
  697. password  for  the  remote account).  Also, recovering using
  698. checkpointing goes out the window  unless  you  specify  the
  699. name of the pointfile as it is named on the remote machine.
  700.  
  701. 12.  UFC Support and notes on fast crypt() implementations
  702.  
  703. The stdlib version of the crypt() subroutine  is  incredibly
  704. slow.   It is a massive bottleneck to the execution of Crack
  705. and on typical platforms that you get at universities, it is
  706. rare to find a machine which will achieve more than 50 stan-
  707. dard crypt() s per second.   On  low-end  diskless  worksta-
  708. tions,  you may expect 2 or 3 per second.  It was this slow-
  709. ness of the crypt() algorithm which originally supplied much
  710. of the security Unix needed.[7]
  711.  
  712. _________________________
  713.   [7] See: "Password Security, A Case History"  by  Bob
  714. Morris & Ken Thomson, in the Unix Programmer Docs.
  715.  
  716.  
  717.  
  718.  
  719.                        March 3, 1992
  720.  
  721.  
  722.  
  723.  
  724.  
  725.                            - 12 -
  726.  
  727.  
  728. There are now many implementations  of  faster  versions  of
  729. crypt()  to  be found on the network.  The one supplied with
  730. Crack v3.2 and upwards is called fcrypt().   It  was  origi-
  731. nally written in May 1986 by Robert Baldwin at MIT, and is a
  732. good version of the crypt() subroutine.  I received  a  copy
  733. from Icarus Sparry at Bath University, who had made a couple
  734. of portability enhancements to the code.
  735.  
  736. I rewrote most of the tables and the KeySchedule  generating
  737. algorithm  in  the original fdes-init.c to knock 40% off the
  738. execution overhead of fcrypt()  in  the  form  that  it  was
  739. shipped  to  me.   I inlined a bunch of stuff, put it into a
  740. single file, got  some  advice  from  Matt  Bishop  and  Bob
  741. Baldwin  [both  of whom I am greatly indebted to] about what
  742. to do to the xform() routine  and  to  the  fcrypt  function
  743. itself,  and  tidied  up some algorithms.  I have also added
  744. more lookup tables and reduced several  formula  for  faster
  745. use.   Fcrypt() is now barely recognisable as being based on
  746. its former incarnation, and it is 3x faster.
  747.  
  748. On a DecStation 5000/200, fcrypt() is about 16 times  faster
  749. than  the  standard  crypt (your mileage may vary with other
  750. architectures and compilers).  This speed puts fcrypt() into
  751. the "moderately fast" league of crypt implementations.
  752.  
  753. Amongst other crypt  implementations  available  is  UFC  by
  754. Michael  Glad.   UFC-crypt is a version of the crypt subrou-
  755. tine which  is  optimised  for  machines  with  32-bit  long
  756. integers  and  generally outperforms my fcrypt() by a factor
  757. of between 1 and 3, for a tradeoff of  large  memory  usage,
  758. and memory-cache unfriendliness.  Hooks for even more optim-
  759. ised assembler versions of crypt()  are  also  provided  for
  760. some  platforms  (Sun,  HP, ...).  Getting UFC to work on 16
  761. bit architectures is nearly impossible.
  762.  
  763. However, on most architectures,  UFC  generates  a  stunning
  764. increase  in  the power of Crack, and so, from v4.1 onwards,
  765. Crack is written to automatically make use of UFC if it  can
  766. find  it.   All  that you have to do is to obtain a suitable
  767. copy of UFC (preferably a version which mentions that it  is
  768. compatible  with  Crack v4.1, and unpack it into a directory
  769. called ufc-crypt in $CRACK_HOME, and then  delete  your  old
  770. binaries.   UFC  will then be detected, compiled, tested and
  771. used in preference to fcrypt() by the Crack  program,  wher-
  772. ever possible.
  773.  
  774. 13.  Conclusions
  775.  
  776. What can be done about brute force attacks on your  password
  777. file ?
  778.  
  779. You must get  a  drop-in  replacement  for  the  passwd  and
  780. yppasswd  commands; one which will stop people from choosing
  781. bad  passwords  in  the  first  place.   There  are  several
  782.  
  783.  
  784.  
  785.                        March 3, 1992
  786.  
  787.  
  788.  
  789.  
  790.  
  791.                            - 13 -
  792.  
  793.  
  794. programs  to  do  this;  Matt  Bishop's  passwd+  and  Clyde
  795. Hoover's npasswd program are good examples which are  freely
  796. available.   Consult  an Archie database for more details on
  797. where you can get them from.
  798.  
  799. It would be nice if an organisation (such as CERT?) could be
  800. persuaded  to  supply  skeletons of sensible passwd commands
  801. for the public good, as  well  as  an  archive  of  security
  802. related utilities[8] on top of the excellent COPS.  However,
  803. for Unix security to improve on a global scale, we will also
  804. require pressure on the vendors, so that programs are  writ-
  805. ten correctly from the beginning.
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843. _________________________
  844.   [8] COPS  is  available  for   anonymous   FTP   from
  845. cert.sei.cmu.edu (128.237.253.5) in ~/cops
  846.  
  847.  
  848.  
  849.  
  850.                        March 3, 1992
  851.  
  852.  
  853.